package com.szr.leex.service.impl.user;

import java.util.List;
import java.util.Set;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.szr.leex.dao.BaseDao;
import com.szr.leex.dao.user.RoleDao;
import com.szr.leex.po.user.Role;
import com.szr.leex.service.impl.BaseServiceImpl;
import com.szr.leex.service.user.RoleService;

/**
 * role service impl
 * Created by WangChen on 2018/10/13 8:25.
 */
@Service
public class RoleServiceImpl extends BaseServiceImpl<Role, String> implements RoleService{

    @Autowired
    private RoleDao roleDao;

    @Override
    public BaseDao<Role, String> getBaseDao() {
        return roleDao;
    }

    @Override
    public Role getById(String id) {
        return roleDao.findById(id).orElse(null);
    }

    @Override
    public List<Role> getRolesByIds(Set<String> ids) {
        return roleDao.findAllById(ids);
    }


}
